from asyncio import timeout


class Person:
    def __init__(self,name,age,sex,phone_data,phone_id,phone_nc,phone_ns,phone_time,phone_piot):
        self.name = name
        self.age = age
        self.sex=sex
        self.phone_data = phone_data
        self.phone_id = phone_id
        self.phone_nc = phone_nc
        self.phone_ns = phone_ns
        self.phone_time = phone_time
        self.phone_piot = phone_piot
    def send_message(self,message):
        print(self.name+'给中国移动发送'+message)
    def ddh(self,number,time1):
        print('您当前的话费余额为' + str(self.phone_data) + '        您当前的积分为：' + str(self.phone_piot))
        if number=='':
            print('当前号码为空号')
        elif self.phone_data<=1:
            print('当前花费不够继续打电话了')
        else:
            print("您的电话正在拨打")
            print('已拨通')
            if time1 <= 10:
                self.phone_data = self.phone_data - time1 * 1
                self.phone_piot = self.phone_piot + time1 * 15
            elif 20 >= time1 > 10:
                self.phone_data = self.phone_data - time1 * 0.8
                self.phone_piot = self.phone_piot + time1 * 39
            else:
                self.phone_data = self.phone_data - time1 * 0.65
                self.phone_piot = self.phone_piot + time1 * 48
            print('您现在的话费余额为' + str(self.phone_data) + '        您现在的积分为：' + str(self.phone_piot))


person1=Person('李慧成',22,'男',100,'','','',100,10)
person1.send_message('红红火火恍恍惚惚')
person1.ddh(17480587532,11)
